package com.googlecode.jerato.library.view.xml;

import java.io.Writer;
import java.util.List;

import com.googlecode.jerato.core.view.ViewParameters;
import com.googlecode.jerato.core.view.ViewTransfer;
import com.googlecode.jerato.library.store.StoreService;

public class XmlViewNodeStoreSelect extends XmlViewNode{

	protected String _storeName;
	protected String _listName;
	public String getStoreName() {
		return _storeName;
	}
	public void setStoreName(String name) {
		_storeName = name;
	}
	public String getListName() {
		return _listName;
	}
	public void setListName(String name) {
		_listName = name;
	}
	public void render(Writer writer, ViewTransfer trans, ViewParameters input, ViewParameters output){
		StoreService.getInstance().getData(_storeName).call(trans, input, output);
		List list = output.getResultList();
		output.put(_listName, list);
	}

}
